using System;

namespace Model
{
	/// <summary>
	/// Summary description for ExternalAccount.
	/// </summary>
	[Serializable]
	public class ExternalAccount
	{
		//private string accountType; Omitted becuase we goin to use inheritance
		private string accountName;
		private string ownerName;
		private decimal balance;
		
		//public string AccountType
		//{
		//	get
		//	{
		//		return accountType;
		//	}
		//	set
		//	{
		//		accountType = value;
		//	}
		//}
		
		public string AccountName
		{
			get
			{
				return accountName;
			}
			set
			{
				accountName = value;
			}
		}

		public string OwnerName
		{
			get
			{
				return ownerName;
			}
			set
			{
				ownerName = value;
			}
		}
	

		public	decimal	 Balance
		{
			get
			{
				return balance;
			}
			
			set
			{
				balance = value;
			}
		}


		public ExternalAccount(string iniAccName,string iniOwnerName,decimal thibalance)
		{
			balance =thibalance;
			accountName = iniAccName;
			ownerName = iniOwnerName;
		}
		public string toString()
		{
			string result ="";
			result += accountName;
			return result;
		}
		public void Deposit(decimal amount)
		{
			balance += amount;
		}
		public void Withdraw(decimal amount)
		{
			balance -= amount;
		}
	}
}
